﻿<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WF_ProcessAnalysis.aspx.vb"
    Inherits="MyWorkflow.WF_ProcessAnalysis" %>
<html>
<head>
    <title>流程效率分析</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<link rel="stylesheet" type="text/css" href="/_nav/tabs.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
		<link rel="stylesheet" type="text/css" href="/_controls/tree/tree.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_common/scripts/Details.js"></script>
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_controls/datetime/time.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookup.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/_grid/rep_grid.js"></script>		
		<script language="javascript" src="/_forms/FormBase.js"></script>
		<script language="javascript" src="Workflow.js"></script>

    <script language="javascript">
        //在线帮助文件
        var _MyHelpfile = "/MyWorkflow/help/流程管理/流程效率分析/流程效率分析.htm";
        
        window.onload = function() {
            $id("txtBUGUID").value = _BUGUID;
            $id("txtBUName").value = _BUName;
            $id("txtBeginDatetime").value = _BeginDatetime;
            $id("txtEndDatetime").value = _EndDatetime;
            var Url = "WF_ProcessAnalysis_Grid.aspx";
            var Params = "?mode=0";
            Params += "&BUGUID=" + _BUGUID;
            Params += "&BUName=" + _BUName;
            Params += "&BeginDatetime=" + _BeginDatetime;
            Params += "&EndDatetime=" + _EndDatetime;
            document.all("ifrmProcessAnalysis").src = Url + Params;
        }
        function chgDate(strValue) {
            var BeginDate = $id("txtBeginDatetime");
            var EndDate = $id("txtEndDatetime");
            if (BeginDate.value.length == 0 || EndDate.value.length == 0) return;
            switch (strValue) {
                case "BeginDate":
                    if (BeginDate.value > EndDate.value) {
                        alert("“流程发起起始日期”必须小于“流程发起截止日期”！");
                        BeginDate.value = EndDate.value;
                        BeginDate.focus();
                    }
                    break;
                case "EndDate":
                    if (BeginDate.value > EndDate.value) {
                        alert("“流程发起截止日期”必须大于“流程发起起始日期”！");
                        EndDate.value = BeginDate.value;
                        EndDate.focus();
                    }
                    break;
                default:
                    break;
            }
        }
        //功能：选择单位
        function oprBeforeSelectBusinessUnit(o) {
            var sTitle = "选择单位";
            var sFile = "/MyWorkflow/Interface/PUB/SelectCompany.aspx";
            var url = "/FrameTemp0.aspx";
            var params = "title=" + escape(sTitle);
            params += "&filename=" + escape(sFile);
            var sWidth = "360px";
            var sHeight = "500px";
            var returnValue = openMyDlg(sTitle, url, params, "", sWidth, sHeight);
            if (typeof returnValue == "object") {
                returnValue = returnValue.items[0];
                if (returnValue == null || returnValue.id == null) {
                    return;
                }
                $id(o.getAttribute("field")).value = returnValue.id;
                $id(o.getAttribute("textfield")).value = returnValue.value;
            }
        }

        function oprQuery() {
            if ($id("txtBUGUID").value == "") {
                alert("请选择所属单位！");
                return;
            }
            if ($id("txtBeginDatetime").value == "") {
                alert("请选择“流程发起起始日期”！");
                return;
            }
            if ($id("txtEndDatetime").value == "") {
                alert("请选择“流程发起截止日期”！");
                return;
            }
            var Url = "WF_ProcessAnalysis_Grid.aspx";
            var Params = "?mode=1";
            Params += "&BUGUID=" + $id("txtBUGUID").value;
            Params += "&BUName=" + $id("txtBUName").value;
            Params += "&BeginDatetime=" + $id("txtBeginDatetime").value;
            Params += "&EndDatetime=" + $id("txtEndDatetime").value;
            document.all("ifrmProcessAnalysis").src = Url + Params;
        }
    </script>

</head>
<body ms_positioning="GridLayout" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px;
    padding-top: 5px">
    <form runat="server">
    <cnt:AppLog ID="appLog" runat="server" />

        <table cellspacing="0" cellpadding="2" width="100%" height="100%" border="0">
            <tr height="25">
                <td>
                    <input type="hidden" id="txtBUGUID" />
                    <table cellspacing="0" cellpadding="2" width="100%" border="0">
                        <colgroup>
                            <col width="240" />
                            <col width="260" />
                            <col width="200" />
                            <col />
                        </colgroup>
                        <tr style="white-space: nowrap">
                            <td>
                                <table style="table-layout: fixed" cellspacing="0" cellpadding="0" width="100%">
                                    <colgroup>
                                        <col width="80" />
                                        <col />
                                        <col width="40" />
                                    </colgroup>
                                    <tr>
                                        <td style="white-space:nowrap;">
                                            所属单位
                                        </td>
                                        <td>
                                            <input type="text" readonly="readonly" id="txtBUName" />
                                        </td>
                                        <td style="padding-left: 4px">
                                            <img class="lookup" field="txtBUGUID" textfield="txtBUName" onclick="oprBeforeSelectBusinessUnit(this);"
                                                src="/_imgs/btn_off_lookup.gif" /></td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table style="table-layout: fixed" cellspacing="0" cellpadding="0" width="100%">
                                    <colgroup>
                                        <col width="100" />
                                        <col />
                                        <col width="40">
                                    </colgroup>
                                    <tr>
                                        <td style="white-space:nowrap;">
                                            流程发起日期 从
                                        </td>
                                        <td>
                                            <input type="text" class="dtm" id="txtBeginDatetime" crmtype="dtm" returnValue="" time="0"
                                                maxlength="16" onreturnvaluechange="chgDate('BeginDate')" />
                                        </td>
                                        <td style="padding-left: 4px">
                                            <img class="dtm" src="../../_imgs/btn_off_cal.gif" align="absMiddle">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table style="table-layout: fixed" cellspacing="0" cellpadding="0" width="100%">
                                    <colgroup>
                                        <col width="40" />
                                        <col />
                                        <col width="40">
                                    </colgroup>
                                    <tr>
                                        <td style="text-align: center">
                                            到
                                        </td>
                                        <td>
                                            <input type="text" class="dtm" id="txtEndDatetime" crmtype="dtm" returnValue="" time="0"
                                                maxlength="16" onreturnvaluechange="chgDate('EndDate')" />
                                        </td>
                                        <td style="padding-left: 4px">
                                            <img class="dtm" src="../../_imgs/btn_off_cal.gif" align="absMiddle">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td align="right" style="white-space: nowrap">
                                <button type="button" onclick="oprQuery()">
                                    查找</button>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <div class="tab" id="tab0" style="display: inline;">
                        <table style="font-size: 9pt" height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tr>
                                <td>
                                    <iframe src="" id="ifrmProcessAnalysis" frameborder="no" height="100%" width="100%"
                                        scrolling="no"></iframe>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
